package com.dly.blog.domain.ro;

import com.dly.blog.enums.FileType;
import com.dly.blog.enums.UploadPermissions;
import com.dly.blog.enums.UploadType;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;

/**
 * @Author: DaiLiYu
 * @Date: 2023/7/13 0:07
 */
@Data
public class FileRO {

    @Schema(description = "文件类型")
    private FileType fileType = FileType.OTHER;

    @Schema(description = "文件")
    @NotNull(message = "文件不能为空")
    private MultipartFile[] multipartFiles;

    @Schema(description = "上传方式")
    private UploadType uploadType = UploadType.LOCAL;

    /**
     * Permissions 公开或者私有
     */
    @Schema(description = "上传类型")
    private UploadPermissions uploadPermissions = UploadPermissions.PUBLIC;

    /**
     * 过期时间
     */
    @Schema(description = "过期时间/秒")
    private Integer expirationDate;
}
